package com.epam.facebook_client.wrapper;

import common.wrapper.JSONObjectWrapper;


public class Albums extends JSONObjectWrapper {

	private static final String ID = "id";
	private static final String NAME = "name";
	private static final String COVER = "cover_photo";
	private static final String COUNT = "count";
	private static final String USER_ID = "id";
	private static final String FROM = "from";
	
	public Albums() {
		super();
	}

	public Albums(String json) {
		super(json);
	}

	public String getId() {
		return getString(ID);
	}

	public String getName() {
		return getString(NAME);
	}

	public String getCover() {
		return getString(COVER);
	}
	
	public String getUserId() {
		return getJSONObject(FROM).getString(USER_ID);
	}

	public Integer getCount() {
		Integer count = getInt(COUNT);
		if (count == null) {
			return 0;
		}
		return count;
	}

	public boolean isEmpty() {
		if (getCount() == null) {
			return true;
		}
		return false;
	}
}
